package rmi;

import java.rmi.*;
import java.rmi.server.UnicastRemoteObject;


public class ObjetoRemoto extends UnicastRemoteObject implements InterfazRemota {
	private static final long serialVersionUID = 1L;
	
	public ObjetoRemoto() throws RemoteException {
		super();	
	}

	public int dado() throws RemoteException {
		return ((int)(Math.random()*6)) + 1;
	}

	public int suma(int[] val) throws RemoteException {
		int s = 0;
		for(int v : val) s += v;
		return s;
	}

}
